<%@ include file="tagHTMLLibIncludes.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
   <link href="${ctx}/css/opm.css" rel="stylesheet" type="text/css" />
   <link href="${ctx}/js/dijit/themes/claro/claro.css" rel="stylesheet" type="text/css" />
   <title>Optimize Content Management</title>
</head>
<script type="text/javascript" src="${ctx}/js/dojo/dojo.js" djConfig="parseOnLoad: true"></script>
<script type="text/javascript">
dojo.require("dijit.layout.ContentPane");
dojo.require("dijit.layout.BorderContainer");
dojo.require("dijit.form.TextBox");
dojo.require("dijit.form.Button");
dojo.addOnLoad(function(){
   setupLayout();
   if (document.pub){
      document.pub();
   }
});
 
function setupLayout(){
   var layout = new dijit.layout.BorderContainer({style:"height: 100%; width: 100%"},"mainLayout");
   var header = new dijit.layout.ContentPane({region: "top"},"header");
   var center = new dijit.layout.ContentPane({region: "center"},"center");
   var footer = new dijit.layout.ContentPane({region: "bottom"},"footer");
   layout.addChild(header);
   layout.addChild(center);
   layout.addChild(footer);
   layout.startup();
}
</script>
<body class="claro">
    <div id="mainLayout">
        <div id="header" style="margin: 0; padding: 0; height: 40px;">
            <img src="${ctx}/images/opm.png" width="60" height="40"/>
            <img src="${ctx}/images/opm1.png" width="60" height="40"/>
            <img src="${ctx}/images/opm2.jpeg" height="40"/>
            <div class="logo">Optimize Content Management</div>
         </div>
         <div id="center">
            <form name="f" action="loginProcess" method="post">
                <fieldset class="fieldsCollection">
                    <legend><fmt:message key="login.title"/></legend>
                    <div class="dotline"></div>
                    <c:if test="${not empty param.login_error}">
                    <div class="divRow">
                        <div class="input">
                            <span class="error"><fmt:message key="login.msg.failure"/></span>
                            <br/><br/>
                            <span class="error">Reason: <c:out value="${SPRING_SECURITY_LAST_EXCEPTION.message}"/>.</span>
                        </div>
                    </div>
                    </c:if>
                    <div class="divRow">
                        <div class="label">
                            <label for="j_username" class="label"><fmt:message key="login.username"/></label>
                        </div>
                        <div class="input">
                            <input type="text" id="j_username" name="j_username" value="admin" dojoType="dijit.form.TextBox"/>
                        </div>
                    </div>
                    <div class="divRow">
                        <div class="label">
                            <label for="j_password" class="label"><fmt:message key="login.password"/></label>
                        </div>
                        <div class="input">
                            <input type="password" id="j_password" name="j_password" value="vvquan" dojoType="dijit.form.TextBox"/>
                        </div>
                    </div>
                    <div class="divRow">
                        <div class="inputButton">
                            <input id="jreset" type="reset" dojoType="dijit.form.Button" label="<fmt:message key="btn.reset"/>"/>
                            <input id="jsubmit" type="submit" dojoType="dijit.form.Button" label="<fmt:message key="btn.submit"/>"/>
                        </div>
                    </div>
                </fieldset>
            </form>
         </div>
         <div id="footer">
            Optimize Content Management
         </div>
     </div>
</body>
</html>
